using System;
using UnityEngine;

[Serializable]
public class loadarenastadiumr : MonoBehaviour
{
	public GameObject stadiums;

	public AudioClip clip;

	public Texture pressed;

	public Texture unpressed;

	public string arenatoload;

	public bool canload;

	private GUITexture gui;

	public loadarenastadiumr()
	{
		arenatoload = "arena1";
	}

	public void Start()
	{
		gui = (((GUITexture)GetComponent(typeof(GUITexture))) as GUITexture);
	}

	public void Update()
	{
		if (UnityEngine.Input.touchCount > 0)
		{
			Touch touch = Input.touches[0];
			if (touch.phase == TouchPhase.Began && GetComponent<GUITexture>().HitTest(touch.position) && canload)
			{
				stadiums.SetActiveRecursively(state: false);
				AudioSource.PlayClipAtPoint(clip, Camera.main.transform.position);
				gui.texture = pressed;
				Application.LoadLevelAsync(arenatoload);
			}
			if (UnityEngine.Input.touchCount == 0)
			{
				gui.texture = unpressed;
			}
		}
	}

	public void Main()
	{
	}
}
